from py2neo import Graph, NodeMatcher, RelationshipMatcher, Node, Relationship


class Neo4jDB:

    def __init__(self, **kwargs):
        self.host = None
        self.port = None
        self.auth = None
        self.graph = None
        if kwargs:
            self.init(**kwargs)

    def init(self, host='127.0.0.1', port=7687, auth: tuple = None):
        self.host = host
        self.port = port
        self.auth = auth
        self.graph = Graph(host=self.host, port=self.port, auth=self.auth)


neo4j_db = Neo4jDB()


if __name__ == '__main__':
    neo4j_db.init(host="192.168.101.7", port=7687, auth=("neo4j", "aiops"))
    print(neo4j_db)
